<template>
    <!-- 水质评价 -->
    <div class="water-quality-evaluation-page">
      <div class="analysis-object-tree-warp">
        <water-radio-tree @getCheckedNodes = 'getSiteCheckedNodes'></water-radio-tree>
      </div>
      <div class="secondary-page-content">
        <el-scrollbar class="page-content-scroll">
          <water-quality-evaluation-area
            v-if="openPage==='area'"
            :nodes="siteChecked">
          </water-quality-evaluation-area>
          <water-quality-evaluation-river
            v-if="openPage==='river'"
            :nodes="siteChecked">
          </water-quality-evaluation-river>
          <water-quality-evaluation-station
            v-if="openPage==='station'"
            :nodes="siteChecked">
          </water-quality-evaluation-station>
        </el-scrollbar>
      </div>
    </div>
</template>

<script>
    import waterRadioTree from '@/components/waterRadioTree'
    import waterQualityEvaluationArea from './waterQualityEvaluationA'
    import waterQualityEvaluationRiver from './waterQualityEvaluationC'
    import waterQualityEvaluationStation from './waterQualityEvaluationD'
    export default {
        name: "waterQualityEvaluation",
        data(){
          return {
            siteChecked:[],
            openPage:'area',
          }
        },
        created(){
             this.$store.commit("setShowlefttree", false);
        },
        methods:{
            getSiteCheckedNodes(nodes){
            this.siteChecked = nodes;
            this.openPage = nodes.structureType;
          }
        },
        components:{
          waterRadioTree,
          waterQualityEvaluationArea,
          waterQualityEvaluationRiver,
          waterQualityEvaluationStation
        }
    }
</script>

<style scoped lang="less">
.water-quality-evaluation-page{
  height: 100%;
  .page-content-scroll{
    height: 100%;
  }
}
</style>
